<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="../common.jsp"%>
<%@ page import="cn.firstsoft.firstframe.admin.PropertyFile"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<%
	String flag = request.getParameter("businesFlag");
	String ret = null;
	if (null != flag && "enter".equals(flag)) {
		String business = request.getParameter("business");
		String readBusiness = PropertyFile.readValue(
		"firstframe.properties", "constant.business");
		if ((null == readBusiness)
		|| (null != readBusiness && !business
				.equals(readBusiness))) {
			boolean bool = PropertyFile.writeProperties(
			"firstframe.properties", "constant.business",
			business);
			if (bool) {
		ret = "设置成功,并请重新启动服务器！";
			} else {
		ret = "设置失败,并请重设置！";
			}
		} else {
			ret = "未进行设置，当前服务器的设置与您想设置的一致！";
		}
	}
	String readbusinessValue = PropertyFile.readValue("firstframe.properties", "constant.business");
%>
<c:set var="retValue" value="<%=ret%>" />
<c:set var="chkValue" value="<%=readbusinessValue%>" />



<html>
	<head>
		<title>管理控制台 - 环境设置 - 业务系统集成</title>
		<%@ include file="/common/meta2.jsp"%>
		<link href="../style.css" type="text/css" rel="stylesheet">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	</head>
	<body>
		<form method="post" name="businessForm"
			action="business_edit.jsp?businesFlag=enter">
			&nbsp;
			<input class="button" type="submit" value="提&nbsp;&nbsp;交" />
			<input class="button" type="reset" value="重&nbsp;&nbsp;置" />
			<c:if test="${not empty retValue }">
				<br>
				<c:out value="${retValue }" />
			</c:if>
			<table width="100%" align="center">
				<tr>
					<th class="listViewPaginationTdS1" align="left" colSpan="4">
						业务系统集成
					</th>
				</tr>
				<tr>
					<th align="right">
						名&nbsp;称
					</th>
					<th align="left">
						设置值
					</th>
					<th align="left">
						默认值
					</th>
					<th align="left">
						描&nbsp;&nbsp;述
					</th>
				</tr>
				<tr>
					<th align="right">
						是否集成业务系统：
					</th>
					<c:choose>
						<c:when test="${chkValue=='true' }">
							<th class="dataField" width="20%" align="left">
								<input type="radio" name="business" value="true" checked="checked" />
								是
								<input type="radio" name="business" value="false" />
								否
							</th>
						</c:when>
						<c:otherwise>
							<th class="dataField" width="20%" align="left">
								<input type="radio" name="business" value="true" />
								是
								<input type="radio" name="business" value="false"
									checked="checked" />
								否
							</th>
						</c:otherwise>
					</c:choose>
					<td align="left" width="20%">
						(flase)
					</td>
					<td align="left">
						是否集成业务系统 是为集成，否为不集成，默认为否
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>
